<template>
    <view v-if="!hidden" class="log" ref="toast" @click="showLog">{{params}}</view>
</template>
 
<script>
    export default {
		data(){
			return {
				params:'',
				hidden:true,
				timeout:''
			}
		},
        methods:{
            show(data){
				var that = this
				this.hidden = false
				this.params = data
				this.timeout = setTimeout(function(){
					that.hidden = true
				},3000)
                // this.$refs.toast.show();
            },
			showLog(){
				this.hidden = false
			}
        }
    }
</script>
<style>
	.log{
		width: 100%;
		height: auto;
		max-height: 100vh;
		border-radius: 10px;
		padding: 10rpx;
		position: fixed;
		background-color: black;
		color: white;
		bottom: 0;
		z-index: 1000;
		overflow-y: auto;
		word-break: break-all;
		word-wrap: break-word;
		white-space: pre-wrap
	}
</style>